<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Index</title>
    <!--引用jquery-->
    <script src="./js/jquery.min.js"></script>
</head>
<body>
<!--<form action="/save" method="post">-->
    <!--姓名：<input type="text" th:value="${name}" name="name"/><br/>-->
    <!--年龄：<input type="text" th:value="${age}" name="age"/><br/>-->
    <!--简介：<input type="text" th:value="${info}" name="info"/><br/>-->
<!--</form>-->
<!--<form action="http://localhost:8081/edu/addTeacher" method="post" enctype="multipart/form-data">-->

<!--</form>-->
<input type="file" name="file">
<input type="submit" value="发送图片">

<input type="text" id="username">
<input type="button" value="提交" id="btn">
<script>
    $(function () {
        $("#btn").click(function () {
            $.ajax({
                type: "POST",
                url: "http://localhost:8081/edu/test",
                data: "username="+$("#username").val(),
                success: function (msg) {
                    console.log(msg)
                }
            })
        })
    })
</script>

</body>
</html>
